package JavaEE_notes.common_API;

import java.util.Arrays;

/**
 * @description System 类
 * @author TaiZai
 * @data 2024/9/19 14:18
 */
public class api_System {
    public static void main(String[] args) {

//        // 获取时间戳计算程序运行时间
//        long start = System.currentTimeMillis();
//        for (int i = 0; i < 1000000; i++) {
//            System.out.println(i);
//        }
//        long time = System.currentTimeMillis() - start;
//        System.out.println("Time taken: " + time + "ms");

        // 退出
        System.exit(0);

        // 复制数组
        int[] arr1 = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        int[] arr2 = new int[arr1.length];
        System.arraycopy(arr1, 3, arr2, 5, 3);
        System.out.println(Arrays.toString(arr2));
    }
}
